<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.0.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"yoursite.com","root":"/","scheme":"Mist","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":true},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="需求:想着装好的Manjaro跟同一网络下我的windows系统的笔记本之间能共享借助网络互传些数据,顺便可以的话就让家里的小米电视播放我放在电脑上的一些媒体资源。在这过程中，了解了些东西，顺便总结一下。">
<meta property="og:type" content="article">
<meta property="og:title" content="Manjaro搭建Samba和DLNA服务">
<meta property="og:url" content="http://yoursite.com/2020/02/03/Manjaro%E6%90%AD%E5%BB%BASamba%E5%92%8CDLNA%E6%9C%8D%E5%8A%A1/index.html">
<meta property="og:site_name" content="FU">
<meta property="og:description" content="需求:想着装好的Manjaro跟同一网络下我的windows系统的笔记本之间能共享借助网络互传些数据,顺便可以的话就让家里的小米电视播放我放在电脑上的一些媒体资源。在这过程中，了解了些东西，顺便总结一下。">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-02-03T10:23:35.000Z">
<meta property="article:modified_time" content="2020-08-02T11:49:36.757Z">
<meta property="article:author" content="fu">
<meta property="article:tag" content="Manjaro安装和配置">
<meta property="article:tag" content="Samba">
<meta property="article:tag" content="DLNA">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="http://yoursite.com/2020/02/03/Manjaro%E6%90%AD%E5%BB%BASamba%E5%92%8CDLNA%E6%9C%8D%E5%8A%A1/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>Manjaro搭建Samba和DLNA服务 | FU</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">FU</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="th fa-fw"></i>分类</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/02/03/Manjaro%E6%90%AD%E5%BB%BASamba%E5%92%8CDLNA%E6%9C%8D%E5%8A%A1/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="fu">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="FU">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Manjaro搭建Samba和DLNA服务
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2020-02-03 18:23:35" itemprop="dateCreated datePublished" datetime="2020-02-03T18:23:35+08:00">2020-02-03</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2020-08-02 19:49:36" itemprop="dateModified" datetime="2020-08-02T19:49:36+08:00">2020-08-02</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E6%8A%80%E6%9C%AF/" itemprop="url" rel="index"><span itemprop="name">技术</span></a>
                </span>
                  ，
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E6%8A%80%E6%9C%AF/Manjaro/" itemprop="url" rel="index"><span itemprop="name">Manjaro</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>需求:想着装好的Manjaro跟同一网络下我的windows系统的笔记本之间能共享借助网络互传些数据,顺便可以的话就让家里的小米电视播放我放在电脑上的一些媒体资源。<br>在这过程中，了解了些东西，顺便总结一下。</p>
<a id="more"></a>

<h1 id="几种媒体共享方式区别"><a href="#几种媒体共享方式区别" class="headerlink" title="几种媒体共享方式区别"></a>几种媒体共享方式区别</h1><p>目前常见的媒体共享方式主要有以下几种：Samba、FTP、Upnp（DLNA）、NFS</p>
<h2 id="Samba"><a href="#Samba" class="headerlink" title="Samba"></a>Samba</h2><p>Windows用户都知道的共享方式，局域网访问方便，一般不用于外网访问。<br>特点是设置方便，缺点是传输效率低，速度不稳定，会有波动。**(我一开始就是搭了这个，后面电视访问电脑看视频的时候，经常不太稳定，才开始找别的方案的。)**<br>所以，Samba已经不是最佳的家庭媒体共享方式。</p>
<h2 id="FTP"><a href="#FTP" class="headerlink" title="FTP"></a>FTP</h2><p>FTP其实还分为SFTP,FTPS，FTP还支持TLS，这些都是在安全方面的增强。因为FTP是明文密码。<br>FTP的优势是只要通讯端口开启，IP没错，都能方便连接上，而且特别适合外网共享。<br>FTP主要用于客户端和服务器之间的文件上传和下载。不适用于修改服务器上的文件。因为它要存取一个文件，就必须先获得一个本地文件的副本，如果修改文件，也只能对文件的副本进行修改，然后再将修改后的文件副本传回到原节点。所以如果你要修改服务器上的一个超大文件，但是只修改几个字节的内容。你依然需要下载整个文件过来，修改完毕后，再回传回去。<br>FTP的速度非常一般，不推荐用来作为家庭媒体服务器的局域网播放方式。</p>
<h2 id="Upnp（DLNA）"><a href="#Upnp（DLNA）" class="headerlink" title="Upnp（DLNA）"></a>Upnp（DLNA）</h2><p>要求设备必须是处于同一网段内，共享服务的设置也比较简单。由于是专门用于局域网媒体播放的协议，所以网络传输效率也很高，超大文件的快进，后退，都很流畅。<strong>唯一的缺点是不支持外挂字幕。</strong><br>另外Upnp（DLNA）的解码是服务器端实现的。所以大幅消耗的是路由器或NAS的硬件资源，而不是播放设备的硬件资源。如果路由器硬件不够强悍，可能会导致其他用户上网受影响。</p>
<h2 id="NFS"><a href="#NFS" class="headerlink" title="NFS"></a>NFS</h2><p>允许应用进程打开一个远地文件，并能够在该文件中某一个特定位置上开始读写数据。本地NFS的客户端应用可以透明地读写位于远端NFS服务器上的文件，就像访问本地文件一样。所以NFS修改服务器上的文件时，可使用户只复制一个大文件中的一个很小的片段，在网络上传送的只是少量的修改数据。<br>NFS的网络利用率也非常高，速度很快。相比Upnp（DLNA），NFS还支持视频外挂字幕。只要将同名的字幕文件放在同一个目录下即可。</p>
<p>我开启的是Samba和DLNA服务(NFS试过，没成功，客户端能扫描到我的目录一直扫描不到里面的资源，各种方法试过了，加上暂时没有需要外挂字幕的资源，就先不搞了。)</p>
<h1 id="Samba和DLNA安装"><a href="#Samba和DLNA安装" class="headerlink" title="Samba和DLNA安装"></a>Samba和DLNA安装</h1><h2 id="Samba服务器安装"><a href="#Samba服务器安装" class="headerlink" title="Samba服务器安装"></a>Samba服务器安装</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S samba nautilus-share manjaro-settings-samba</span><br></pre></td></tr></table></figure>
<p>配置/etc/samba/smb.conf参数<br>安装上面软件之后，开始配置参数，先备份smb.conf</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ mv /etc/samba/smb.conf /etc/samba/smb.conf.bak</span><br></pre></td></tr></table></figure>
<p>然后新建一个，写入如下参数 vim /etc/samba/smb.conf</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">[global]</span><br><span class="line">#所要加入的工作组或者域</span><br><span class="line">workgroup &#x3D; WORKGROUP       </span><br><span class="line">#用于在 Windows 网上邻居上显示的主机名</span><br><span class="line">netbios name &#x3D; Manjaro      </span><br><span class="line">#定义安全级别</span><br><span class="line">security &#x3D; user             </span><br><span class="line">#将所有samba系统主机所不能正确识别的用户都映射成guest用户</span><br><span class="line">map to guest &#x3D; bad user     </span><br><span class="line">#是否开启dns代理服务</span><br><span class="line">dns proxy &#x3D; no              </span><br><span class="line"></span><br><span class="line">#[]内是共享显示的目录名</span><br><span class="line">[media]                    </span><br><span class="line">#实际共享路径</span><br><span class="line">path &#x3D; &#x2F;home&#x2F;johnnychan&#x2F;code    </span><br><span class="line">#共享的目录是否让所有人可见</span><br><span class="line">browsable &#x3D; yes             </span><br><span class="line">#是否可写</span><br><span class="line">writable &#x3D; yes              </span><br><span class="line">#是否允许匿名(guest)访问,等同于public</span><br><span class="line">guest ok &#x3D; yes              </span><br><span class="line">#客户端上传文件的默认权限</span><br><span class="line">create mask &#x3D; 0777          </span><br><span class="line">#客户端创建目录的默认权限</span><br><span class="line">directory mask &#x3D; 0777       </span><br><span class="line">#注意共享文件在系统本地的权限不能低于以上设置的共享权限。</span><br></pre></td></tr></table></figure>
<p>修改好了输入</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ testparm /etc/samba/smb.conf</span><br></pre></td></tr></table></figure>
<p>检查是否有语法错误,接着配置权限和密码工作</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#将系统用户加入到samba用户，并设置密码，这里我们按两次回车，设置成无密码</span></span><br><span class="line">$ smbpasswd -a johnnychan  <span class="comment">#这里johnnychan是自己系统用户名</span></span><br><span class="line">$ pdbedit -L   <span class="comment">#查看所有Samba用户</span></span><br><span class="line">$ smbclient -L 127.0.0.1 <span class="comment">#查看对应IP上的samba服务器,例如这里查看本机</span></span><br><span class="line">chmod 777 /home/johnnychan/code -R <span class="comment">#将 path 中目录的权限设置为777</span></span><br><span class="line">chmod 777 /home/johnnychan/ <span class="comment">#这个不给权限会拒绝访问</span></span><br></pre></td></tr></table></figure>
<p>然后启动服务</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">systemctl start smb    <span class="comment">#启动服务</span></span><br><span class="line">systemctl <span class="built_in">enable</span> smb   <span class="comment">#开机自启</span></span><br><span class="line"><span class="comment">#其他命令</span></span><br><span class="line">systemctl status smb   <span class="comment">#查询状态</span></span><br><span class="line">systemctl restart smb  <span class="comment">#重新启动</span></span><br></pre></td></tr></table></figure>
<p>Manjaro防火墙默认关闭的，并且没有安装selinux，安装了的需要关闭</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">systemctl stop iptables <span class="comment">#关闭防火墙</span></span><br><span class="line">setenforce 0 <span class="comment">#关闭selinux</span></span><br><span class="line">sudo vim /etc/selinux/config <span class="comment">#关闭selinux开机启动</span></span><br><span class="line">将SELINUX=enforcing改为SELINUX=disabled</span><br></pre></td></tr></table></figure>

<h2 id="DLNA分享服务安装"><a href="#DLNA分享服务安装" class="headerlink" title="DLNA分享服务安装"></a>DLNA分享服务安装</h2><p>首先是安裝 DLNA server，使用的是 minidlna 这个软件。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S minidlna</span><br></pre></td></tr></table></figure>
<p>接着编辑/etc/minidlna.conf 来设定分享目录:</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">media_dir=/srv/media</span><br></pre></td></tr></table></figure>
<p>第一行会把 /srv/media 底下所有的媒体文件(照片，影片，音乐)分享出去. 如果想要限制媒体的种类, 可以在目录前加上 V(影片), A(声音)或 P(照片)来指定种类:</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">media_dir=V,/home/johnnychan/dlna/dlna_videos</span><br><span class="line">media_dir=P,/home/johnnychan/dlna/dlna_pictures </span><br></pre></td></tr></table></figure>
<p>还有修改如下的配置:</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#web端口，可以通过ip:port查看索引状态</span></span><br><span class="line">port=8200</span><br><span class="line"><span class="comment">#服务器命名</span></span><br><span class="line">friendly_name=Raspi_DLNA</span><br><span class="line"><span class="comment">#miniDLNA启动的时候，默认用户是minidlna，修改为root，避免后续文件访问的权限问题。</span></span><br><span class="line">user=root </span><br><span class="line"><span class="comment">#开启自动更新媒体库</span></span><br><span class="line">inotify=yes  </span><br></pre></td></tr></table></figure>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">systemctl start minidlna <span class="comment">#启动服务</span></span><br><span class="line">systemctl force-reload minidlna <span class="comment"># 强制刷新DLNA cache</span></span><br><span class="line">ps -aux|grep minidlna <span class="comment">#查看服务是否已经运行</span></span><br><span class="line">systemctl status minidlna <span class="comment"># 查看服务状态</span></span><br><span class="line">systemctl <span class="built_in">enable</span> minidlna <span class="comment"># MiniDLNA随机启动</span></span><br></pre></td></tr></table></figure>
<p>访问界面<a target="_blank" rel="noopener" href="http://127.0.0.1:8200/">http://127.0.0.1:8200/</a> 可以查看索引状态<br>这么一来, 支持 DLNA 的播放程序如VLC 就可以直接浏览 server 上的媒体, 并且串流播放. 当然, 平板或手机也能轻易播放分享出来的媒体，DLNA支持的媒体格式挺丰富的。<br>如果想进一步对某些内容进行设置授权才能够查看的话，可以使用一个利用 MAC address 来过滤封包的程序(ebtables)。</p>
<h1 id="参考链接"><a href="#参考链接" class="headerlink" title="参考链接"></a>参考链接</h1><ul>
<li><a target="_blank" rel="noopener" href="https://www.cnblogs.com/misfit/p/10603277.html">Manjaro搭建无密访问samba服务器</a></li>
<li><a target="_blank" rel="noopener" href="https://ramble.3vshej.cn/minidlna-1-2-1-cn-config/">MiniDLNA 1.2.1 中文配置</a></li>
<li><a target="_blank" rel="noopener" href="https://electronic.blue/blog/2013/01/12-sharing-digital-media-by-dlna-on-linux/">在 Linux 上設定 DLNA 分享服務</a></li>
<li><a target="_blank" rel="noopener" href="https://jiangxiaoqiang.github.io/2017/03/01/minidlna-file-share/">MiniDLNA文件共享</a></li>
<li><a target="_blank" rel="noopener" href="http://www.mikewootc.com/wiki/sw_develop/multimedia/dlna_server_linux_minidlna.html">DLNA分享服务设置(Linux minidlna版)</a></li>
<li><a target="_blank" rel="noopener" href="https://answer-id.com/71211354">MiniDLNA的视频文件夹权限问题</a></li>
</ul>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Manjaro%E5%AE%89%E8%A3%85%E5%92%8C%E9%85%8D%E7%BD%AE/" rel="tag"># Manjaro安装和配置</a>
              <a href="/tags/Samba/" rel="tag"># Samba</a>
              <a href="/tags/DLNA/" rel="tag"># DLNA</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2020/01/31/Manjaro/" rel="prev" title="Manjaro安装调教">
      <i class="fa fa-chevron-left"></i> Manjaro安装调教
    </a></div>
      <div class="post-nav-item">
    <a href="/2020/02/06/%E4%BD%BF%E7%94%A8Travis%E9%83%A8%E7%BD%B2Hexo/" rel="next" title="使用Travis部署Hexo">
      使用Travis部署Hexo <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%87%A0%E7%A7%8D%E5%AA%92%E4%BD%93%E5%85%B1%E4%BA%AB%E6%96%B9%E5%BC%8F%E5%8C%BA%E5%88%AB"><span class="nav-text">几种媒体共享方式区别</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#Samba"><span class="nav-text">Samba</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#FTP"><span class="nav-text">FTP</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Upnp%EF%BC%88DLNA%EF%BC%89"><span class="nav-text">Upnp（DLNA）</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#NFS"><span class="nav-text">NFS</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Samba%E5%92%8CDLNA%E5%AE%89%E8%A3%85"><span class="nav-text">Samba和DLNA安装</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#Samba%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%AE%89%E8%A3%85"><span class="nav-text">Samba服务器安装</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#DLNA%E5%88%86%E4%BA%AB%E6%9C%8D%E5%8A%A1%E5%AE%89%E8%A3%85"><span class="nav-text">DLNA分享服务安装</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%8F%82%E8%80%83%E9%93%BE%E6%8E%A5"><span class="nav-text">参考链接</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">fu</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives">
          <span class="site-state-item-count">9</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">9</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">15</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/yourname" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;yourname" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://weibo.com/yourname" title="Weibo → https:&#x2F;&#x2F;weibo.com&#x2F;yourname" rel="noopener" target="_blank"><i class="fab fa-weibo fa-fw"></i>Weibo</a>
      </span>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">fu</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://mist.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Mist</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>













  

  

</body>
</html>
